<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<?php 
//echo "<pre>";
// print_r($this->paging);
//echo "</pre>";
//exit;	
$binhchonarr = $this->binhchondetail['data'];
@$tenthisinh = $binhchonarr[0]['ten_thi_sinh'];
?>


<center>
	<h1><?php echo  $this->pagename; ?> </h1>
	<h3>Thí sinh: <?php echo $tenthisinh; ?></h3>
</center>

 <div class="nut_page">
<!--            <input type="submit" name="submit" value="Lưu">-->
<?php 
		$phrase  = $this->pageid;
		$healthy = array("1", "2", "3","4", "5", "6","7", "8", "9","0");
		$yummy   = array("p", "o", "a","u", "j", "t","m", "e", "w","q");
		$newphrase = str_replace($healthy, $yummy, $phrase);
		$url = FB_APP_DOMAIN."/admin/thisinh/index?pageid=".$newphrase."&pagename=".$this->pagename."&type=1";
?>
            <a href="javascript:void(0);" onclick="window.top.location.replace('<?php echo $url?>');">Quay lại</a>
 </div>
 
<div style="float:right; margin: 0 5px 5px 0;">
	<input type="button" onClick="window.open('<?php echo APP_DOMAIN ?>/admin/thisinh/exportbinhchon/?tts=<?php echo $tenthisinh ?>&pagename=<?php echo $this->pagename ?>&ipg=<?php echo base64_encode('a7'.$this->id)?>')"  value="Xuất Excel" />
</div>
<br/>
	<table width="100%" border="1" cellspacing="1" style="text-align:center; vertical-align: middle;">
	  <tr bgcolor="whitesmoke" height="35px">
	    <th width="35px" >Stt</th>
	    <th width="300px"  >Mã facebook người bình chọn</th>
	    <th width="100px"  >Ngày bình chọn</th>
	  </tr>
	
	<?php 
							 
	foreach ($binhchonarr AS $k=>$binhchon)
	{
		$cltr = ' cl1 ';
		if($k % 2 == 0)
		{
			$cltr = ' cl2 ';
		}
	?>
	<tr height="35px" class="<?php echo $cltr?>" >
		    <td><?php echo $k+1; ?></td>
		    
		    <td>
		       <a href='javascript:void(0)'  onClick="window.open('http://www.facebook.com/<?php echo $binhchon['id_fb'] ?>')" ><?php echo $binhchon['id_fb'] ?></a>
		    </td>
	    
	       
	       
	       <td>
	      	 <?php 
	      	 echo 	 date('d/m/Y', $binhchon['ngay_binh_chon']);
	      	 ?>
	       </td>

	 </tr>
	<?php 
	}
	if(count($binhchonarr)<=0)
	{
		?>
		<tr height="35px" class="cl1">
			<td colspan="10">
				Chưa có người bình chọn nào
			</td>
		</tr>
		<?php 
	}
	?>
	</table>

<div id='paging_ajax_bc'  align="center" style="display: none;margin: 5px;">
    <?php
    echo $this->paging;
    ?>
</div>

<div id='paging_bc'  align="center" style="display: none;margin: 5px;">
    <?php
    echo $this->paging;
    ?>
</div>
<?php 
$pageid =$this->pageid;
$pagename = $this->pagename;
$id = $this->id;
$allsearch = "pageid=$pageid&pagename=$pagename&thisinhid=$id";
?>
<script>
    common.renderPagingSearch('paging_bc', 'trang trước', 'trang sau', 'Trang đầu', 'Trang cuối', '<?php echo $allsearch ?>');
</script>